package com.dream.keigezhushou.Activity.acty.listen.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.AppCompatCheckBox;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.dream.keigezhushou.Activity.acty.listen.HotMusicWordsActivity;
import com.dream.keigezhushou.R;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by mxmf-001 on 17/3/14.
 */
public class MusicWordsFragment extends Fragment {


    @BindView(R.id.id_words)
    TextView idWords;
    @BindView(R.id.id_danmu_tankuang)
    TextView idDanmuTankuang;
    @BindView(R.id.danmu)
    AppCompatCheckBox danmu;
    @BindView(R.id.id_singing)
    ImageView idSinging;
    @BindView(R.id.id_write)
    ImageView idWrite;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_songwords, null);
        ButterKnife.bind(this, view);


        idWrite.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(getContext(),"123",Toast.LENGTH_SHORT).show();
            }
        });


        danmu.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                if(isChecked==false){
                    danmu.setChecked(true);
                }else {
                    danmu.setChecked(false);
                }
            }
        });

        return view;
    }
}
